var good = {
    id: 123,
    name: "平板",
    price: 2999,
    disCount: 0.6
};
var buy = function (good, balance) {
    if (balance >= (good.disCount ? good.disCount * good.price : good.price)) {
        return true;
    }
    else {
        return false;
    }
};
console.log(buy(good, 1000));
var Bussinessman = /** @class */ (function () {
    function Bussinessman(name) {
        this.name = name;
        this.goods = [];
    }
    Bussinessman.prototype.sendGoods = function (demand, supply) {
        if (demand <= supply) {
            return true;
        }
        return false;
    };
    Bussinessman.prototype.buy = function (good) {
        this.goods.push(good);
    };
    return Bussinessman;
}());
var pb = new Bussinessman('wpb');
console.log(pb.sendGoods(100, 1000));
console.log(pb.name);
pb.buy({
    id: 12123,
    name: 'ipad',
    price: 2889
});
console.log(pb.goods);
